﻿<!DOCTYPE html>
<html>
<head>
		<base href="__ROOT__/">
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">

</head>
 
<body>
	<div class="main">
		<form action="" method="post" >
    		<h1><span>{$act}</span></h1>
  			<div class="inset">
	  			<p>
	    		 <label for="username">用户名：</label>
                <?php if($act=='用户登录'):?>
   	 			    <input name="username" type="text" placeholder="" maxlength="16"  value="<?php if(!empty($_COOKIE['username'])) echo cookie('username');?>"  required/>
                <?php else:?>
                    <input name="username" type="text" placeholder="" maxlength="16"  value="<?php if(!empty($_COOKIE['adminname'])) echo cookie('adminname');?>"  required/>
				<?php endif;?>
                </p>
  				<p>
				    <label for="password">密  码：</label>
                    <?php if($act=='用户登录'):?>
				    <input name="password" type="password" placeholder="" maxlength="16" value="<?php if(!empty($_COOKIE['username'])) echo cookie('password');?>" required/>
                    <?php else:?>
                    <input name="password" type="password" placeholder="" maxlength="16" value="<?php if(!empty($_COOKIE['adminname'])) echo cookie('adminpwd');?>" required/>
                    <?php endif;?>
  				</p>
				  <p>
                      <?php if($act=='用户登录'):?>
				    <input type="checkbox" <?php if(!empty($_COOKIE['password'])){echo  'checked="checked"';};?> name="rem" id="remember"/>
                      <?php else:?>
                      <input type="checkbox" <?php if(!empty($_COOKIE['adminpwd'])){echo  'checked="checked"';};?> name="rem" id="remember"/>
                      <?php endif;?>
				    <label for="remember">记住密码</label>
				  </p>
 			 </div>
 	 
			  <p class="p-container">
			    <input type="submit" value="登录">
                  &nbsp;&nbsp;&nbsp;&nbsp;<a href="index.php/home/index/zhuce">注册用户</a><br>
                  <?php if($act=='用户登录'):?>
                  <a href="index.php/home/index/admin">管理员登录</a>
                  <?php else:?>
                  <a href="index.php">用户登录</a>
                  <?php endif;?>
			  </p>
		</form>
	</div>  
<div>版本1.5</div>
</body>
</html>